<template>
    <ul>
        <li v-for="(student, index) in studentArr" :key="index">
            {{ student.name }}--{{ student.age }}
            <button @click="stunum++">点我学号+1</button>
        </li>
    </ul>
</template>

<script>
export default {
    data() {
        return {
            studentArr: [
                { name: "张三", age: 23 },
                { name: "李四", age: 24 },
            ],
            stunum: this.num,
        };
    },
};
</script>

<style></style>
